<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/12/15
  Time: 23:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>搜索结果</title>
    <style>
        body{
            line-height: 32px;
        }
    </style>
</head>
<body>
<%--页眉--%>
<jsp:include page="/layoutHeader.jsp"/>
<h2>搜索结果</h2>
<form action="home" method="get">
    <input name="a" value="search" type="hidden">
    <%
        String search = request.getParameter("search");
        if (search == null) {
            search = "";
        }
    %>
    <input name="search" value="${search}">&nbsp;&nbsp;&nbsp;&nbsp;
    <button type="submit">搜索</button>
</form>
<hr>
发表时间&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;标题<br>
<c:forEach items="${list}" var="v">
    <a href="article?a=details&id=${v.id}">${v.createTime}&nbsp;&nbsp;&nbsp;&nbsp;${v.title}
    </a>
</c:forEach>
</body>
</html>
